#!/usr/bin/env/ python
# -*- coding: utf-8 -*-

"""
@author: super
@software: PyCharm
@file: book
@time: 2022/1/27 13:27
"""

from api.auth import auth
from core.result_base import ResultBase

def login(username, password):
    '''登录接口'''
    res = ResultBase()
    json_data = {
        "username": username,
        "password": password
    }
    res.response = auth.login_token(json= json_data)
    return res
